/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <cstdio>

using namespace std;

int main_1010()
{
	int m,n;
	int cnt=0;
	while(~scanf("%d %d",&m,&n))
	{
		if(n==0||m==0)
			continue;
		if(cnt==0)
			printf("%d %d",m*n,n-1);
		else
			printf(" %d %d",m*n,n-1);
		++cnt;
	}
	if(cnt==0)
		printf("0 0");
	return 0;
}
